package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.po.ModelDO;
import com.k2data.k2app.domain.po.TaskDTO;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ModelMapper extends K2Mapper<ModelDO> {

    int insertRecord (ModelDO modelDO);

    ModelDO getByModelId (Long modelId);

    /**
     * 删除模型信息
     *
     * @param modelId
     */
    void deleteByModelId (Long modelId);

    @Override
    int updateByPrimaryKeySelective (ModelDO modelDO);

    /**
     * 根据模板模型 更新模型可用状态
     *
     * @param modelDO
     * @return
     */
    int updateUsefulByTemplate(ModelDO modelDO);
}